<?php

namespace app\modules\Agreement\models;

use Yii;

/**
 * This is the model class for table "ai_goods".
 *
 * @property int $id
 * @property int $agreement_id 合同ID
 * @property string $name 货品名称
 */
class Goods extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'ai_goods';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['agreement_id'], 'integer'],
            [['name'], 'required'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'agreement_id' => 'Agreement ID',
            'name' => '货品名称',
        ];
    }
}
